package com.mdp.behavioral.observer;

import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;

public abstract class ObserverSubject {
    
    protected Set<Observer> observers = new CopyOnWriteArraySet<Observer>();
    
    public void attach(Observer observer) {
        observers.add(observer);
    }
    
    public void detach(Observer observer) {
        observers.remove(observer);
    }
    
    public abstract void nofitys();
}
